var SUPPORT_SOURCE_TYPES = [ 'account', 'user', 'event' ];

module.exports.isValidType = function(type) {
  if (type) {
    return SUPPORT_SOURCE_TYPES.indexOf(type) != -1;
  }
  return false;
};

module.exports.composeErrorResult = function(errorMsg, logger) {
  logger.error(errorMsg);
  var result = {};
  result['error'] = {};
  result['error']['OrchestrationLayer'] = errorMsg;
  return result;
};
